package java8;

import java.util.Scanner;

public class Code108 {
	public static void main(String[] args) {
		double[] money=new double[5];
		double sum=0;
		System.out.println("请输入消费记录！");
		Scanner input = new Scanner(System.in);
		for(int i=0;i<money.length;i++){
			System.out.println("请输入第"+(i+1)+"笔购物金额");
			money[i]=input.nextDouble();
			sum+=money[i];	
		}
		System.out.println("\n序号\t\t金额(元)");
		for (int i = 0; i < money.length; i++) {
			System.out.println((i+1)+"\t\t"+money[i]);		
		}
		System.out.println("总金额为\t\t"+sum);
	}
}
